package com.scedu.result;

import lombok.Getter;

/**
 * @Author SC
 * @Description 结果消息枚举
 */
@Getter
public enum ResultCode {
    // 数据操作消息定义
    SUCCESS(200, "成功!"),

    BODY_NOT_MATCH(400,"请求的数据格式不符!"),
    UNAUTHORIZED(401,"暂未登录或token已经过期!"),
    FORBIDDEN(403, "没有相关权限"),
    NOT_FOUND(404, "未找到该资源!"),
    SERVER_BUSY(405,"服务器正忙，请稍后再试!"),

    FAILED(500, "服务器内部错误!"),
    VALIDAT_FAILED(500, "验证错误!"),


    ORDERS_FORM_ERROR(107,"表单参数不正确"),
    JSON_FORM_ERROR(108,"JSON转换错误"),
    JWT_HEADER_ERROR(109,"JWT解析错误"),

    OPENDI_ERROR(701,"openid不正确"),
    WX_MP_ERROR(702,"微信授权错误"),

    LOGIN_ERROR(801,"登录失败！"),
    LOGOUT_SUCCESS(802,"注销成功！"),
    ;
    private Integer code;
    private String message;

    private ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
